home *** CD-ROM | disk | FTP | other *** search
- #include "test.h"
- #pragma hdrstop
-
- void test_CRAS( void )
- {
- CRAS ras;
-
- CStringArray strings;
-
- if ( ras.GetPhoneBookEntries( strings ) == TRUE )
- {
- DWORD index = 0;
- DWORD number_of_entries = strings.GetSize();
-
- TRACE( "Phone Book Entries:\n" );
-
- while( index < number_of_entries )
- {
- TRACE1( "\"%s\"\n", (const char *) strings[ index ] );
- index++;
- }
- }
-
- strings.RemoveAll();
-
- if ( ras.GetConnections( strings ) == TRUE )
- {
- DWORD index = 0;
- DWORD number_of_entries = strings.GetSize();
-
- TRACE( "\nCurrent Connections:\n" );
-
- while( index < number_of_entries )
- {
- TRACE1( "\"%s\"\n", (const char *) strings[ index ] );
- index++;
- }
- }
-
- if ( ras.Open( "Cheetah2" ) != TRUE )
- {
- CString error_string;
- ras.GetErrorString( error_string );
- TRACE1( "Ras Open failed with \"%s\"!\n", (const char *) error_string );
- }
- else
- {
- TRACE( "RAS Open!\n" );
- }
-
- strings.RemoveAll();
-
- if ( ras.GetConnections( strings ) == TRUE )
- {
- DWORD index = 0;
- DWORD number_of_entries = strings.GetSize();
-
- TRACE( "\nCurrent Connections:\n" );
-
- while( index < number_of_entries )
- {
- TRACE1( "\"%s\"\n", (const char *) strings[ index ] );
- index++;
- }
- }
-
- if ( ras.HangUp( "cheetah2" ) == TRUE )
- {
- TRACE( "Hangup OK\n" );
- }
- }
-